<script lang="ts" setup>
import { Gitee } from '@/config/constants'
import { useRoute } from 'vue-router'

const { fullPath } = useRoute()
const url = `${Gitee}/blob/master/src/views${fullPath}/index.vue`
</script>
<template>
  <div class="app-source"><a :href="url" target="_blank" rel="noopener noreferrer"> &lt; code /&gt; </a></div>
</template>
<style lang="scss">
// 所有layouts中组件样式
.app-source {
  position: fixed;
  width: 85px;
  height: 25px;
  line-height: 25px;
  bottom: 20px;
  right: -13px;
  font-size: 12px;
  border-radius: 3px;
  background-color: rgba(#000, 0.7);
  border: 1px solid #000;
  z-index: 9999;
  transition: all 0.3s;
  padding-right: 13px;
  a {
    color: #fff;
    padding: 0 15px;
  }
  &:hover {
    right: -8px;
    background-color: rgba(#000, 0.9);
  }
}
</style>
